package demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 苏李涛
 * Date: 2024-05-15
 * Time: 19:18
 */
public class Dog extends Animal {

    public Dog(String name, int age) {
        super(name,age);
        this.name = name;
        this.age = age;
    }
    /*private String name;
    private int age;

    public Dog(String name, int age) {
        this.name = name;
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public String toString() {
        return "Dog{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    public void eat() {
        System.out.println("正在吃饭。。。");
    }*/

    public void wawa() {
        System.out.println(name + " 正在汪汪叫。。。");
    }

    public static void main(String[] args) {

    }
}
